package main

import (
	"os"
	"flag"
	"fmt"
	"github.com/nofuck/reports/generator"
)

var (
	path, output, filename string
)

func init() {
	gopath := os.Getenv("GOPATH")
	defaultDir := fmt.Sprintf("%s%s", gopath, "/data")
	defaultOutput := fmt.Sprintf("%s%s", gopath, "/data")
	flag.StringVar(&path, "d", defaultDir, "data src path")
	flag.StringVar(&output, "p", defaultOutput, "generate file output path")
	flag.StringVar(&filename, "n", "" , "generator file name")
	flag.Parse()
}

func main() {
	report := new(generator.XlsxReport)
	report.Filename = filename
	report.CreateXlsx(path, output)
}
